x86emul: don't special case fetching the immediate of PUSH
authorJan Beulich <jbeulich@suse.com>
Fri, 12 Aug 2016 14:54:24 +0000 (16:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 12 Aug 2016 14:54:24 +0000 (16:54 +0200)
commit848d8eee52c1122c13dc2f76431a83720cd9267d
tree9aaead4cd65ba1edcb7d1573bda58338fb696c96
parentcbfe4db8d750f3efdd11d482934b1cbfbe4284e6
x86emul: don't special case fetching the immediate of PUSH

These immediates follow the standard patterns in all modes, so they're
better fetched by the generic source operand handling code.

To facilitate testing, instead of adding yet another of these pretty
convoluted individual test cases, simply introduce another blowfish run
with -mno-accumulate-outgoing-args (the additional -Dstatic is to
keep the compiler from converting the calling convention to
"regparm(3)", which I did observe it does).

To make this introduction of a new blowfish pass (and potential further
ones later one) have less impact on the readability of the final code,
abstract all such "binary blob" executions via a table to iterate
through.

The resulting native code execution adjustment also uncovered a lack of
clobbers on the asm() in the 64-bit case, which is being fixed at once.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/x86_emulator/Makefile
tools/tests/x86_emulator/blowfish.mk
tools/tests/x86_emulator/test_x86_emulator.c
xen/arch/x86/x86_emulate/x86_emulate.c